package com.example.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.custom.BaseService;
import com.example.demo.entity.CarsOrder;

import com.example.demo.entity.SysUser;
import com.example.demo.repository.CarsOrderRepository;
@Service
public class CarsOrderService extends BaseService<CarsOrder, Integer>{
	@Autowired
	CarsOrderRepository CarsOrderDAO;

	public CarsOrder findByPhone(String phone) {
		// TODO Auto-generated method stub
		return CarsOrderDAO.findByPhone(phone);
	}




	public CarsOrder findByPhoneAndUserId(String phone, SysUser user) {
		// TODO Auto-generated method stub
		return CarsOrderDAO.findByPhoneAndUserId(phone,user);
	}

	

	public List<CarsOrder> findByUserId(SysUser user){
		return CarsOrderDAO.findByUserId(user);
	}

	
	

}
